package de.dhbw.ka.tit09.picsim.model;

/**
 * Representation of a source text row.
 * 
 * @author Andreas Bender
 * 
 */
public class SourceText {
	private String text;
	private boolean isCommand;

	/**
	 * Constructor.
	 * 
	 * @param text the human readable source text
	 * @param isCommand true if the text contains an instruction
	 */
	public SourceText(String text, boolean isCommand) {
		this.text = text;
		this.isCommand = isCommand;
	}

	/**
	 * Returns the text value.
	 * 
	 * @return the text
	 */
	public String getText() {
		return text;
	}

	/**
	 * Sets the text value.
	 * 
	 * @param text the text value
	 */
	public void setText(String text) {
		this.text = text;
	}

	/**
	 * Returns true if the source text contains an instruction.
	 * 
	 * @return true if is command
	 */
	public boolean isCommand() {
		return isCommand;
	}

	/**
	 * Sets the value of the instruction flag.
	 * 
	 * @param isCommand the instruction flag
	 */
	public void setCommand(boolean isCommand) {
		this.isCommand = isCommand;
	}
}
